const router = require("koa-router")()
const { Sequelize, DataTypes } = require('sequelize')
const sequelize = new Sequelize('stage5', 'root', 'mysql', {
  host: 'localhost',
  dialect: 'mysql'
})


// router.get('/getData', async (ctx, next) => {
//   console.log(ctx);
//   let res = await sequelize.authenticate().then(res => {
//     console.log(res);
//     return '数据库连接成功'
//   }).catch(err => {
//     return '数据库连接失败' + err
//   })
//   ctx.body = res
// })

module.exports = router

